// Decompiled on 周六 2月 22 19:31:49 CST 2025 with Zomboid Decompiler v0.1.3 using Vineflower.
package zombie.core.skinnedmodel.population;

import java.util.ArrayList;
import javax.xml.bind.annotation.XmlElement;

public class ClothingDecalGroup {
    @XmlElement(
        name = "name"
    )
    public String m_Name;
    @XmlElement(
        name = "decal"
    )
    public final ArrayList<String> m_Decals = new ArrayList();
    @XmlElement(
        name = "group"
    )
    public final ArrayList<String> m_Groups = new ArrayList();
    private final ArrayList<String> tempDecals = new ArrayList();

    public String getRandomDecal() {
        this.tempDecals.clear();
        this.getDecals(this.tempDecals);
        String string = OutfitRNG.pickRandom(this.tempDecals);
        return string == null ? null : string;
    }

    public void getDecals(ArrayList<String> decals) {
        decals.addAll(this.m_Decals);

        for (int _int = 0; _int < this.m_Groups.size(); _int++) {
            ClothingDecalGroup clothingDecalGroup = ClothingDecals.instance.FindGroup((String)this.m_Groups.get(_int));
            if (clothingDecalGroup != null) {
                clothingDecalGroup.getDecals(decals);
            }
        }
    }
}
